
cc.Class({
    extends: cc.Component,

    properties: {
      boxMessageDic:""
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    init(boxDic){

        console.log("游戏盒子独立信息",boxDic);
       this.boxMessageDic=boxDic
        var that = this     
        cc.loader.load({url: boxDic["icon"], type: 'png'}, function(err,img){

            var mylogo  = new cc.SpriteFrame(img); 
       
            that.node.getComponent(cc.Sprite).spriteFrame = mylogo;
       
        });
    },

    enterOtherGame:function(){

      wx.navigateToMiniProgram({
        appId: this.boxMessageDic["appid"],
        success(res) {
            console.log("成功进入其他游戏");
        }
    })

    }


    // update (dt) {},
});
